//
//  NetworkManager.h
//  jingduoduoDemo
//
//  Created by 韩志宇 on 16/4/12.
//  Copyright © 2016年 caobo56. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RootViewController.h"
typedef void (^JDDResponseBlock)(NSDictionary* completedOperation);
typedef void (^JDDNKResponseErrorBlock)(NSString* StringError);

@interface NetworkManager : NSObject
@property(nonatomic,copy)JDDResponseBlock responseblock;
@property(nonatomic,copy)JDDNKResponseErrorBlock resphoseerrorblock;
@property(nonatomic,retain)RootViewController  * viewcontroller;
/**
 *  网络请求，多线程，队列
 *
 *  @param controller 调用者控制器，用于网络请求失败跳转
 *  @param address    请求地址
 *  @param params     请求参数字典
 *  @param HUDTextt   HUD显示内容，获悉用户等待 可以为nil
 *  @param response   返回字典
 *  @param errorblock 失败信息
 *
 *  @return <#return value description#>
 */
+(NetworkManager *)HttpRequestAndController:(RootViewController *)controller AndrequestAddress:(NSString * )address Andparams:(NSMutableDictionary *)params  AndHUDtext:(NSString *)HUDTextt CompletionHandler:(JDDResponseBlock)response errorHandler:(JDDNKResponseErrorBlock)errorblock;
@end
